<?php



//准备装载数据
	require_once("./includes/configure.php");
	require_once("./includes/database.php");
	$db = Database::Connect();
	$zufang_quyu_array = $db->getConfigurationArray('zufang_quyu');
	$zufang_xianlu_array = $db->getConfigurationArray('zufang_xianlu');
	$zufang_zujin_array = $db->getConfigurationArray('zufang_zujin');
	$ershoufang_mianji_array = $db->getConfigurationArray('ershoufang_mianji');
	$zufang_fangxing_array = $db->getConfigurationArray('zufang_fangxing');
	$ershoufang_leixing_array = $db->getConfigurationArray('zufang_leixing');


         require_once("./includes/func.php");
		$current_url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME']."?".initUrl($_SERVER['QUERY_STRING']);

	//挨着拼接url
	//第一个问号
	if(!strpos($current_url,"?")){
		$current_url .= '?sj=lx';
	}
?>
<div class="fcklinks">
<div style="height: 8px; *height: 10px;"><span></span></div>
<div class="condition_links2 condition_link2_def" id="panel_apf_id_9">
<div>
<div class="condition_title">区域：</div>
<div class="container" id="apf_id_9_areacontainer">
<?php echo '<a href="'.deleteRepeatVar($current_url,'quyu').'">';
		if(!$_GET['quyu']){
			echo '<strong>不限</strong></a>';
		}else{
			echo '不限</a>';
		}
?><?php
		for($ii=0;$ii<count($zufang_quyu_array);$ii++){
			if($_GET['quyu']==$zufang_quyu_array[$ii]['this_id']){
				echo '<a href="'.deleteRepeatVar($current_url,'quyu').'&quyu='.$zufang_quyu_array[$ii]['this_id'].'"  title="'.$zufang_quyu_array[$ii]['value'].'"><strong>'.$zufang_quyu_array[$ii]['value'].'</strong></a>';
			}else{
				echo '<a href="'.deleteRepeatVar($current_url,'quyu').'&quyu='.$zufang_quyu_array[$ii]['this_id'].'"  title="'.$zufang_quyu_array[$ii]['value'].'">'.$zufang_quyu_array[$ii]['value'].'</a>';
			}
		}
	?>
	<?php
		if($_GET['quyu'] && is_numeric($_GET['quyu'])){
			$zufang_quyu2_array = $db->getConfigurationArray2('zufang_shangquan',$_GET['quyu']);
			//区域下级
			echo '<div style="border: 1px solid #F39800;margin-right: 10px;padding: 0 0 0 6px;">';
				$quyu2_right = false;
				for($ii=0;$ii<count($zufang_quyu2_array);$ii++){
					if($_GET['quyu2']==$zufang_quyu2_array[$ii]['this_id']){
						$quyu2_right = true;
						break;
					}
				}
				if(!$quyu2_right){
					$_GET['quyu2'] = null;
				}
				echo '<a href="'.deleteRepeatVar($current_url,'quyu2').'">';
				if(!$_GET['quyu2']){
					echo '<strong>不限</strong></a>';
				}else{
					echo '不限</a>';
				}
		
				for($ii=0;$ii<count($zufang_quyu2_array);$ii++){
					if($_GET['quyu2']==$zufang_quyu2_array[$ii]['this_id']){
						echo '<a href="'.deleteRepeatVar($current_url,'quyu2').'&quyu2='.$zufang_quyu2_array[$ii]['this_id'].'"  title="'.$zufang_quyu2_array[$ii]['value'].'"><strong>'.$zufang_quyu2_array[$ii]['value'].'</strong></a>';
					}else{
						echo '<a href="'.deleteRepeatVar($current_url,'quyu2').'&quyu2='.$zufang_quyu2_array[$ii]['this_id'].'"  title="'.$zufang_quyu2_array[$ii]['value'].'">'.$zufang_quyu2_array[$ii]['value'].'</a>';
					}
				}
			echo '</div>';
		}
	?>
</div>
</div>

<!--<div>
<div class="condition_title">线路：</div>
<div class="container" id="apf_id_9_areacontainer"><strong>不限</strong>
	<?php
		//for($ii=0;$ii<count($zufang_xianlu_array);$ii++){
		//	echo '<a href="'.$current_url.'&xianlu='.$zufang_xianlu_array[$ii]['this_id'].'"  title="'.$zufang_xianlu_array[$ii]['value'].'">'.$zufang_xianlu_array[$ii]['value'].'</a>';
		//}
	?>
</div>
</div>-->

<div>
<div class="condition_title">租金：</div>
<div class="containerprice">
<?php echo '<a href="'.deleteRepeatVar($current_url,'zujin').'">';
	if(!$_GET['zujin']){
		echo '<strong>不限</strong></a>';
	}else{
		echo '不限</a>';
	}
?>
<?php
	for($ii=0;$ii<count($zufang_zujin_array);$ii++){
		if($_GET['zujin']==$zufang_zujin_array[$ii]['value']){
			echo '<a href="'.deleteRepeatVar($current_url,'zujin').'&zujin='.$zufang_zujin_array[$ii]['value'].'"  title="'.$zufang_zujin_array[$ii]['C'].'"><strong>'.$zufang_zujin_array[$ii]['C'].'</strong></a> &nbsp;';
		}else{
			echo '<a href="'.deleteRepeatVar($current_url,'zujin').'&zujin='.$zufang_zujin_array[$ii]['value'].'"  title="'.$zufang_zujin_array[$ii]['C'].'">'.$zufang_zujin_array[$ii]['C'].'</a> &nbsp;';
		}
	}
?>
</div>
</div>

<div>
<div class="condition_title">户型：</div>
<div class="container">
<?php echo '<a href="'.deleteRepeatVar($current_url,'huxing').'">';
	if(!$_GET['huxing']){
		echo '<strong>不限</strong></a>';
	}else{
		echo '不限</a>';
	}
?>
<?php
	for($ii=0;$ii<count($zufang_fangxing_array);$ii++){
		if($_GET['huxing']==$zufang_fangxing_array[$ii]['value']){
			echo '<a href="'.deleteRepeatVar($current_url,'huxing').'&huxing='.$zufang_fangxing_array[$ii]['value'].'"  title="'.$zufang_fangxing_array[$ii]['C'].'"><strong>'.$zufang_fangxing_array[$ii]['C'].'</strong></a>';
		}else{
			echo '<a href="'.deleteRepeatVar($current_url,'huxing').'&huxing='.$zufang_fangxing_array[$ii]['value'].'"  title="'.$zufang_fangxing_array[$ii]['C'].'">'.$zufang_fangxing_array[$ii]['C'].'</a>';
		}
	}
?>
</div>
</div>

<div>
<div class="condition_title">类型：</div>
<div class="container">
<?php echo '<a href="'.deleteRepeatVar($current_url,'leixing').'">';
	if(!$_GET['leixing']){
		echo '<strong>不限</strong></a>';
	}else{
		echo '不限</a>';
	}
?>
<?php
	for($ii=0;$ii<count($ershoufang_leixing_array);$ii++){
		if($_GET['leixing']==$ershoufang_leixing_array[$ii]['value']){
			echo '<a href="'.deleteRepeatVar($current_url,'leixing').'&leixing='.$ershoufang_leixing_array[$ii]['value'].'"  title="'.$ershoufang_leixing_array[$ii]['C'].'"><strong>'.$ershoufang_leixing_array[$ii]['C'].'</strong></a>';
		}else{
			echo '<a href="'.deleteRepeatVar($current_url,'leixing').'&leixing='.$ershoufang_leixing_array[$ii]['value'].'"  title="'.$ershoufang_leixing_array[$ii]['C'].'">'.$ershoufang_leixing_array[$ii]['C'].'</a>';
		}
	}
?>
</div>
</div>
<div>
<div class="condition_title">租赁方式：</div>
<div class="container">
<?php echo '<a href="'.deleteRepeatVar($current_url,'fangshi').'">';
	if(!$_GET['fangshi']){
		echo '<strong>不限</strong></a>';
	}else{
		echo '不限</a>';
	}
?>
<?php
	echo '<a href="'.deleteRepeatVar($current_url,'fangshi').'&fangshi=zz"  title="整组">';
	if($_GET['fangshi']=='zz'){echo '<strong>整组</strong></a>';}else{echo '整组</a>';}
	echo '<a href="'.deleteRepeatVar($current_url,'fangshi').'&fangshi=hz"  title="合租">';
	if($_GET['fangshi']=='hz'){echo '<strong>整组</strong></a>';}else{echo '整组</a>';}
?>
</div>
</div>
</div>
<div class="condition_fake_352"></div>
</div>





<div class="search-result2" style="z-index: 99; display:none;">
<div class="keywords352" id="keywords">
<form action="<?php echo deleteRepeatVar($current_url,'kw');?>" id="ls_form_apf_id_13" class="keywordform" method="get" style="display:none;">
	<input type="text" maxlength="100" name="kw" id="resultkw" class="kw" value="在结果中搜索" onclick="this.value='';">
	<input type="submit" class="search" value="搜索">
</form>
<div class="asline"></div>

<div id="condmenu" style="display:none;">
<div
	style="display: none; width: 11px; height: 14px; *margin-top: -3px; margin-top: 8px; background: url(images/list_bg_20100312.gif) no-repeat 0px -87px; overflow: hidden; float: left"></div>
<ul class="condul">
	<li class="condlist_tip"><span>更多筛选：</span></li>
	<li>
	<select name="zhuangxiu" style="padding:3px;">
		<option value="">&nbsp;&nbsp;装修&nbsp;&nbsp;</option>
		<option value="">&nbsp;&nbsp;不限&nbsp;&nbsp;</option>
		<option value="mp">&nbsp;&nbsp;毛坯&nbsp;&nbsp;</option>
		<option value="ptzx">&nbsp;&nbsp;普通装修&nbsp;&nbsp;</option>
		<option value="jzx">&nbsp;&nbsp;精装修&nbsp;&nbsp;</option>
		<option value="hhzx">&nbsp;&nbsp;豪华装修&nbsp;&nbsp;</option>
		<option value="qt">&nbsp;&nbsp;其它&nbsp;&nbsp;</option>
	</select>
	&nbsp;&nbsp;
	<select name="fabushijian" style="padding:3px;">
		<option value="">&nbsp;&nbsp;发布时间&nbsp;&nbsp;</option>
		<option value="">&nbsp;&nbsp;不限&nbsp;&nbsp;</option>
		<option value="1">&nbsp;&nbsp;1天内&nbsp;&nbsp;</option>
		<option value="3">&nbsp;&nbsp;3天内&nbsp;&nbsp;</option>
		<option value="7">&nbsp;&nbsp;7天内&nbsp;&nbsp;</option>
	</select>
	</li>
</ul>
</div>
</div>
</div>
<?php
$db->close();
?>